home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20000824-20010305
/
000150_news@columbia.edu _Thu Dec 28 15:12:34 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
3KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id PAA20728
for <kermit.misc@cpunix.cc.columbia.edu>; Thu, 28 Dec 2000 15:12:34 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA26942
for <kermit.misc@watsun.cc.columbia.edu>; Thu, 28 Dec 2000 15:12:33 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA26627
for kermit.misc@watsun.cc.columbia.edu; Thu, 28 Dec 2000 14:50:52 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: fdc@columbia.edu (Frank da Cruz)
Subject: Re: A wish for the FTP-client
Date: 28 Dec 2000 19:50:51 GMT
Organization: Columbia University
Message-ID: <92g5ir$q00$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <92g302$65t$1@localhost.localdomain>,
Igor Sobrado <sobrado@string1.ciencias.uniovi.es> wrote:
: I just have tried the FTP-client provided by the first alpha release
: of C-Kermit 7.1.199 and I found a possible improvement to it. I think
: it should be possible to use the FTP-server MDTM command (a command
: that shows the last modification time of a file) to recover in the
: local copies the original date of the files retrieved.
:
: Between the three dates provided by Unix (creation, modification and
: last access) the modification time is probably the most important
: time for the final users.
:
: If this improvement is accepted, a requeriment that should be
: considered is that some FTP-servers have y2k bugs yet and it can
: affect to files modified after december 1999.
:
I looked into this, and it would be easy enough to do, except for one
thing: the lack of a critical API. When you send MDTM <filename> to
the server, it sends back a string like this:
20001228143521
representing 28 December 2000 14:35:21 (UTC/GMT). It is quite easy to
convert this to a struct tm. But to change a file's date (with utime()
or utimes()) requires a time_t, not a struct tm. How do you convert a
struct tm to a time_t in a reliable way? -- i.e. without writing code to
count days, months, years, leap years, leap seconds, and all the rest,
taking each machine's architecture into account. I'm sure I must have
overlooked something obvious -- feel free to embarrass me.
- Frank